﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
using learun.util;

namespace BusinessRepository.sqlserver
{
    public class SqlserverDataBasegg : IDataBase
    {

        
        #region 构造函数
        ///// <summary>
        ///// 构造方法
        ///// </summary>
        public SqlserverDataBasegg(string connString)
        {
           
        }

        //public static IFreeSql sqlserver => sqlserverLazy.Value;
        #endregion

        #region 事务
        public IDataBase BeginTrans()
        {
            //sqlserverLazy.Value.Transaction;
            throw new NotImplementedException();
        }

        public void Close()
        {
            throw new NotImplementedException();
        }

        public void Commit()
        {
            throw new NotImplementedException();
        }
        #endregion

        public async Task<int> Delete<T>(T entity) where T : class
        {
            //throw new NotImplementedException();
           return await g.sqlserver.Delete<T>().Where(entity).ExecuteAffrowsAsync();
        }

        public async Task<int> DeleteAny<T>(object param) where T : class
        {
            return await g.sqlserver.Delete<T>(param).ExecuteAffrowsAsync();
        }

        public Task<int> ExecuteProc(string procName, object param = null)
        {
            //return await g.sqlserver.Ado.<T>(param).ExecuteAffrowsAsync();
            throw new NotImplementedException();
        }

        public Task<T> ExecuteProc<T>(string procName, object param = null) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<int> ExecuteSql(string strSql, object param = null)
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<T>> FindAll<T>() where T : class
        {
            throw new NotImplementedException();
        }

        public Task<T> FindEntity<T>(string sql, object param = null) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<T> FindEntity<T>(object param = null) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<dynamic> FindEntity(string sql, object param = null)
        {
            throw new NotImplementedException();
        }

        public Task<T> FindEntityByKey<T>(object keyValue) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<T>> FindList<T>(string sql, object param = null) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<T>> FindList<T>(object param) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<dynamic>> FindList(string sql, object param = null)
        {
            throw new NotImplementedException();
        }

        public Task<(IEnumerable<T> list, int total)> FindList<T>(string sql, object param, string orderField, bool isAsc, int pageSize, int pageIndex) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<T>> FindList<T>(string sql, object param, Pagination pagination) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<(IEnumerable<dynamic> list, int total)> FindList(string sql, object param, string orderField, bool isAsc, int pageSize, int pageIndex)
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<dynamic>> FindList(string sql, object param, Pagination pagination)
        {
            throw new NotImplementedException();
        }

        public Task<DataTable> FindTable(string sql, object param = null)
        {
            throw new NotImplementedException();
        }

        public Task<(DataTable list, int total)> FindTable(string sql, object param, string orderField, bool isAsc, int pageSize, int pageIndex)
        {
            throw new NotImplementedException();
        }

        public Task<DataTable> FindTable(string sql, object param, Pagination pagination)
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<dynamic>> GetDataBaseTable()
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<dynamic>> GetDataBaseTableFields(string tableName)
        {
            throw new NotImplementedException();
        }

        public string GetDataSource()
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<string>> GetSqlColName(string strSql)
        {
            throw new NotImplementedException();
        }

        public Task<int> Insert<T>(T entity) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<dynamic> QueryFirstProc(string procName, object param = null)
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<T>> QueryProc<T>(string procName, object param = null) where T : class
        {
            throw new NotImplementedException();
        }

        public Task<IEnumerable<dynamic>> QueryProc(string procName, object param = null)
        {
            throw new NotImplementedException();
        }

        public void Rollback()
        {
            throw new NotImplementedException();
        }

        public string TestConnection()
        {
            throw new NotImplementedException();
        }

        public Task<int> Update<T>(T entity, bool isOnlyHasValue = false) where T : class
        {
            throw new NotImplementedException();
        }
    }
}
